package com.tuanzi.loan.business.entity.statistics.api;

public interface ApiFlowStatSql {

    String apiStatisticsSql = "SELECT  SUM(active_num) as active_num,SUM(view_detail_new_uv) as view_detail_new_uv,SUM(click_detail_new_uv) as click_detail_new_uv,SUM(view_api_uv) as view_api_uv,SUM(pre_push_uv) as pre_push_uv,SUM(push_uv) as push_uv,SUM(pregrant_uv) as pregrant_uv,SUM(loan_uv) as loan_uv,SUM(today_loan_uv) as today_loan_uv,SUM(max_grant_amount) as max_grant_amount,SUM(loan_amount_new) as loan_amount_new,SUM(loan_amount_old) as loan_amount_old,SUM(loan_amount) as loan_amount,SUM(income) as income{replace_select_field} FROM    ads_revenue_report WHERE   dt BETWEEN  :startDate AND     :endDate {replace_search_by_api}{replace_search_by_product}{replace_group_by_field} ORDER BY daytime DESC LIMIT :limit OFFSET :offset;";

    String apiStatisticsCountSql = "SELECT  COUNT(*) as countNumber FROM  (SELECT  1 FROM    ads_revenue_report WHERE   dt BETWEEN :startDate  AND  :endDate {replace_search_by_api}{replace_search_by_product}{replace_group_by_field}) a;";
}
